const app = getApp()
export default {
  fetch: (url, data) => {
    return new Promise((resolve, reject) => {
      wx.request({
        url: app.config.url + url,
        data,
        success: resolve,
        fail: reject
      })
    })
  }
}